<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?php echo C('SITE_INFO.name');?></title>
<script type="text/javascript" src="__PUBLIC__/scripts/jquery-1.7.2.min.js"></script>
<link href="__PUBLIC__/Catalog/css/common.css" rel="stylesheet" type="text/css" />

<link href="__PUBLIC__/Catalog/css/noticeList.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main">
   <div class="title">
         <div class="title1">
             <a href="<?php echo U('Index/index');?>" id="back"> < </a>公告信息
         </div>
   </div>
   <div class="noticelist">
       <ul  id="ncontent">
       		<?php if(is_array($newslist)): foreach($newslist as $key=>$vo): ?><li>
		             <dl>
		                <dd class="des"><a href="<?php echo U('News/detail');?>?newsid=<?php echo ($vo["news_id"]); ?>"><?php if($vo['top_flag'] == 1): ?>[置顶]<?php endif; echo ($vo["news_title"]); ?></a></dd>
		                <dd style="padding-left: 10px;"><span id="dates"><?php echo ($vo["news_added"]); ?></span><span id="clicks"><?php echo ($vo["viewd"]); ?></span></dd>
		             </dl>
		          </li><?php endforeach; endif; ?>
         
       </ul>
   </div>
</div>
<input type="hidden" id="nowpage" value="<?php echo ($nowpage); ?>" />
<?php if($flag == 1): ?><div class="foot"><a href="javascript:addMore();">加载更多内容>></a></div><?php endif; ?>
<script>
function addMore(){
	var nowpage = $('#nowpage').val();
	
	$.ajax({
		type:'GET',
		url:"<?php echo U('News/getmore');?>",
		datatype:'json',
		data:{nowpage:nowpage},
		success:function(data){
			datacontent =window.JSON.parse(data);
			//alert(datacontent.flag);
			if(datacontent.flag){
				alert('已经没有新公告了！')
			}else{
				var str=datacontent.ncontent;
				$('#ncontent').append(str);
				$('#nowpage').val(datacontent.page);
			
			}
		},
		error: function(XMLHttpRequest, textStatus, errorThrown) {
			alert(XMLHttpRequest.status);
			alert(XMLHttpRequest.readyState);
			alert(textStatus);
		},

	})
}

</script>
<div class="index-foot">
    <div class="index-foot2">
            <ul>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Index/index');?>"><img src="__PUBLIC__/Catalog/images/house.png" /></a></dd>
                      <dd><a href="<?php echo U('Index/index');?>">首页</a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Products/index');?>"><img src="__PUBLIC__/Catalog/images/cate1.png" /></a></dd>
                      <dd><a href="<?php echo U('Products/index');?>">商品</a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd><a href="<?php echo U('Mproducts/publish');?>"><img src="__PUBLIC__/Catalog/images/jia.png"style=" width:50px; height:50px;" /></a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Membership/leaveword');?>"><img src="__PUBLIC__/Catalog/images/message.png" /></a></dd>
                      <dd><a href="<?php echo U('Membership/leaveword');?>">信息</a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Membership/index');?>?uid=<?php echo ($uid); ?>"><img src="__PUBLIC__/Catalog/images/men.png" /></a></dd>
                      <dd><a href="<?php echo U('Membership/index');?>?uid=<?php echo ($uid); ?>">我的</a></dd>
                  </dl>
              </li>
            </ul>       
    </div>
</div>
</body>
</html>